3 subject="""comment 1"""
4 date="2022-05-03T16:15:38Z"
6 `git-annex import $dir` also follows symlinks inside $dir.
7 So importing has been behaving this way since long before the directory
8 special remote supported importtree.
10 This is not a security hole, because if an attacker wants to make you
11 import `/foo` when importing `/bar`, and they have write access to bar,
12 they are not limited to making a `/bar/foo -> /foo` symlink. They can just
13 `cp -a /foo /bar` instead.
15 I don't really think it would make much sense for any import to import
16 symlinks as symlinks. If the symlink points outside the imported directory,
17 that would result in a symlink that points outside the git repository,
18 which is not something one often wants to check into a git repository.
20 I don't know if I would really consider this a bug either. It at least
21 seems plausible that there might be users who import from `~/disk`
22 which is a symlink to `/media/somethinglong`, and rely on it following
23 the symlink. I often make symlink aliases for mount points like that,
24 though I have not imported from them.